hfrApp.registerCtrl("SummaryController", function ($scope, $http, $log, $window, $rootScope, HfrConfig) {
	
	//Display meta header
	HfrConfig.displayMeta("summary");
	
	//Get all topic
	var blogCustomerUrl = HfrConfig.ApiServiceUrl.blogsUrlApi + "?customerId=" + $rootScope.username; 
	$scope.customerId = $rootScope.username;
	$http.get(blogCustomerUrl)
		.success(function (data) {
			$scope.blogs = data.response.blogs;
			$scope.totalBlogs = Object.keys(data.response.blogs).length;
		})
		.error(function (data) {
			$rootScope.message.error = true;
	    	$rootScope.message.text = "Can't post data to server";
		});
});